package main.IOStream;

import java.io.*;

public class Test {
    public static void main(String[] args)  {
        File f = new File("data\\rr.txt");
        System.out.println(f.getAbsoluteFile().getParent());
        try{
            FileInputStream in = new FileInputStream(f);
            byte[] b =new byte[10];
//            int len = in.read(b);
//            System.out.println(new String(b));
//            System.out.println(len);
            int len = 0;
            while(( len = in.read(b))!= -1){
                System.out.println(new String(b,0,len));
                System.out.println(len);
            }
            in.close();
        }catch (Exception e){
            e.printStackTrace();
        }



    }
}
